/*

Author   : chaos

FileName : string_class.cpp

Date     : 16/08/17 16:41:21

*/
#include <iostream>
#include <string>
using namespace std;

int main(int argc ,char *argv[])
{
    char p[5] = "John";
    string s1("string");
    string s2(s1);
    string s3(s1,2,4);

    string s4;
    string s5(5,'*');
    string s6(p+1,p+3);
    string s7 = s1;

    cout << "s1 = " << s1 << " s2 = " << s2 << " s3 = " << s3 << endl;
    cout << "s4 = " << s4 << " s5 = " << s5 << " s6 = " << s6 << endl;

    cout << "s7 = " << s7 << endl;
    return 0;
}
